package org.bud.rung.netty.coder;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;
import org.bud.rung.bit.JobRequest;
import org.bud.rung.netty.util.Hessians;
import org.bud.rung.netty.util.Kryos;

import java.util.List;

import static java.lang.System.in;

/**
 * @author shaun
 * @date 2024/8/10
 * @instruction
 */
public class Decoder extends ByteToMessageDecoder {

    protected void decode(ChannelHandlerContext channelHandlerContext, ByteBuf byteBuf, List<Object> list) throws Exception {
        Object obj = Kryos.deserialize(byteBuf);
        list.add(obj);
    }
}
